/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.company.common.dao.impl;

import com.company.common.dao.DistricDao;
import com.company.regis.db.BaseDao;
import com.company.regis.db.entity.District;
import java.util.List;
import org.springframework.stereotype.Repository;

/**
 *
 * @author totoland
 */
@Repository("districDao")
public class DistricDaoImpl extends BaseDao implements DistricDao {

    @Override
    public List<District> getDistrictByAmphurId(String amphurId) {
        return findNativeQuery("SELECT DISTRICT_ID,"
                + "  DISTRICT_CODE,"
                + "  DISTRICT_NAME,"
                + "  AMPHUR_ID,"
                + "  PROVINCE_ID,"
                + "  GEO_ID"
                + "  FROM DISTRICT WHERE AMPHUR_ID = ? ", District.class, amphurId);
    }

}
